package com.mustachio.urlshortener
{
	import mx.collections.ArrayCollection;
	
	public class LinkModel
	{
		private static var instance:SingletonDemo;
     	private static var allowInstantiation:Boolean;
     	
     	private var ModelLinkArray:ArrayCollection;
		
		public static function getInstance():LinkModel {
         if (instance == null) {
            allowInstantiation = true;
            instance = new LinkModel();
            allowInstantiation = false;
          }
         return instance;
       }
		
		public function LinkModel()
		{
			if (!allowInstantiation) {
            throw new Error("Error: Instantiation failed: Use SingletonDemo.getInstance() instead of new.");
          }
		}

	}
}